class MusicController < ApplicationController
  
  
  class Track
    attr_accessor :name
    attr_accessor :length
    attr_accessor :artist
    
    def initialize(name, length, artist)
      @name = name
      @length = length
      @artist = artist
    end
  end
  
  
  def tracks
    @tracks = 
    [ 
      Track.new("Moving", "5.45", "Mick Delaney"),
      Track.new("Flight", "7.05", "Mick Delaney")
    ]
    
    respond_to do |format| 
      format.html 
      format.json { render :json => @tracks } 
    end 
  end

end
